<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>内联元素环绕</title>
    <style>

    .ele {
      display:inline-block;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      line-height: 30px;
      text-align: center;
      color: white;
      
    }
    .float {
        float: left;
        
    }
   .front {
    background-color: black;
   }
   .back {
    background-color: blue;
   }

    </style>
</head>
<body>
    <div>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>

    
        
        <img src="img/purplestar.png" alt="" class="float">

        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        
    </div>
</body>
</html>